<template>
  <div>
  <button @click="decrement">-</button>
  <h3>{{$store.state.num}}</h3>
  </div>
</template>

<script>
  export default {
    name: "VueX",
    methods:{
      decrement(){
        this.$store.commit("decrement")
      }

    }
  }
</script>

<style scoped>

</style>